FROM python:3.10-slim

WORKDIR /app

# 安装依赖
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# 只复制需要的应用代码，忽略web目录
COPY app/ ./app/
COPY arq_worker.py .
COPY .env .

# 创建必要的目录
RUN mkdir -p uploads downloads

# 暴露端口
EXPOSE 8000

# 启动命令
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]